package com.zz.framework.core.base

import android.view.View
import com.zz.framework.R
import com.zz.framework.core.widget.SuperRefreshManager

/**
 * Copyright © 2020 zanezhao All rights reserved.
 * Created on 2020/3/18 11:44 AM.
 * @version: V1.0
 */
abstract class BaseLazyListFragment: BaseLazyFragment() {
    protected var currentPage:Int = 1
    protected var mSuperRefreshManager: SuperRefreshManager? = null


    override fun onInitAttribute(ba: BaseAttribute) {
        super.onInitAttribute(ba)
        ba.mContentLayoutId = R.layout.refresh_recyclerview_layout
    }

    override fun initView(view: View) {
        super.initView(view)
        mSuperRefreshManager = SuperRefreshManager().also {
            it.init(view)
        }
    }

    override fun error(message: String) {
        super.error(message)
        mSuperRefreshManager?.finish()
    }
}